<template>
  <view class="main">
    <u-form labelPosition="left" ref="form1">
      <u-textarea placeholder="请输入昵称" type="textarea" :showWordLimit="true" :maxlength="15" :count="true" autoHeight height="auto" border="none" v-model="nickName"></u-textarea>
    </u-form>
    <view class="bottomBox">
      <u-button type="primary" @click="submit" shape="circle" color="#81d8d0">提交</u-button>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { updateUserNickName } from "@/api/my";
import { ref } from "vue";
const nickName = ref();
const submit = async () => {
  await updateUserNickName({ nickName: nickName.value, userId: uni.getStorageSync("userId") });
  uni.navigateBack();
};
</script>

<style lang="less" scoped></style>
